//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS AIOps service.
///
/// The CloudWatch investigations feature is a generative AI-powered assistant that can help you respond to incidents in your system. It uses generative AI to scan your system's telemetry and quickly surface suggestions that might be related to your issue. These suggestions include metrics, logs, deployment events, and root-cause hypotheses.  You can use API actions to create, manage, and delete investigation groups and investigation group policies. To start and manage investigations, you must use the CloudWatch console.
public struct AIOps: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the AIOps client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            serviceName: "AIOps",
            serviceIdentifier: "aiops",
            serviceProtocol: .restjson,
            apiVersion: "2018-05-10",
            endpoint: endpoint,
            errorType: AIOpsErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }





    // MARK: API Calls

    /// Creates an investigation group in your account. Creating an investigation group is a one-time setup task for each Region in your account. It is a necessary task to be able to perform investigations. Settings in the investigation group help you centrally manage the common properties of your investigations, such as the following:   Who can access the investigations   Whether investigation data is encrypted with a customer managed Key Management Service key.   How long investigations and their data are retained by default.   Currently, you can have one investigation group in each Region in your account. Each investigation in a Region is a part of the investigation group in that Region To create an investigation group and set up CloudWatch investigations, you must be signed in to an IAM principal that has the either the AIOpsConsoleAdminPolicy or the AdministratorAccess IAM policy attached, or to an account that has similar permissions.  You can configure CloudWatch alarms to start investigations and add events to investigations. If you create your investigation group with CreateInvestigationGroup and you want to enable alarms to do this, you must use PutInvestigationGroupPolicy to create a resource policy that grants this permission to CloudWatch alarms.  For more information about configuring CloudWatch alarms to work with CloudWatch investigations, see
    @Sendable
    @inlinable
    public func createInvestigationGroup(_ input: CreateInvestigationGroupInput, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateInvestigationGroupOutput {
        try await self.client.execute(
            operation: "CreateInvestigationGroup", 
            path: "/investigationGroups", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates an investigation group in your account. Creating an investigation group is a one-time setup task for each Region in your account. It is a necessary task to be able to perform investigations. Settings in the investigation group help you centrally manage the common properties of your investigations, such as the following:   Who can access the investigations   Whether investigation data is encrypted with a customer managed Key Management Service key.   How long investigations and their data are retained by default.   Currently, you can have one investigation group in each Region in your account. Each investigation in a Region is a part of the investigation group in that Region To create an investigation group and set up CloudWatch investigations, you must be signed in to an IAM principal that has the either the AIOpsConsoleAdminPolicy or the AdministratorAccess IAM policy attached, or to an account that has similar permissions.  You can configure CloudWatch alarms to start investigations and add events to investigations. If you create your investigation group with CreateInvestigationGroup and you want to enable alarms to do this, you must use PutInvestigationGroupPolicy to create a resource policy that grants this permission to CloudWatch alarms.  For more information about configuring CloudWatch alarms to work with CloudWatch investigations, see
    ///
    /// Parameters:
    ///   - chatbotNotificationChannel: Use this structure to integrate CloudWatch investigations with Amazon Q in chat applications. This structure is a string array. For the first string, specify the ARN of an Amazon SNS topic. For the array of strings, specify the ARNs of one or more Amazon Q in chat applications configurations that you want to associate with that topic. For more information about these configuration ARNs, see Getting started with Amazon Q in chat applications and Resource type defined by Amazon Web Services Chatbot.
    ///   - crossAccountConfigurations: Number of sourceAccountId values that have been configured for cross-account access.
    ///   - encryptionConfiguration: Use this structure if you want to use a customer managed KMS key to encrypt your investigation data. If you omit this parameter, CloudWatch investigations will use an Amazon Web Services key to encrypt the data. For more information, see Encryption of investigation data.
    ///   - isCloudTrailEventHistoryEnabled: Specify true to enable CloudWatch investigations to have access to change events that are recorded by CloudTrail. The default is true.
    ///   - name: Provides a name for the investigation group.
    ///   - retentionInDays: Specify how long that investigation data is kept. For more information, see Operational investigation data retention.  If you omit this parameter, the default of 90 days is used.
    ///   - roleArn: Specify the ARN of the IAM role that CloudWatch investigations will use when it gathers investigation data. The permissions in this role determine which of your resources that CloudWatch investigations will have access to during investigations. For more information, see How to control what data Amazon Q has access to during investigations.
    ///   - tagKeyBoundaries: Enter the existing custom tag keys for custom applications in your system. Resource tags help Amazon Q narrow the search space when it is unable to discover definite relationships between resources. For example, to discover that an Amazon ECS service depends on an Amazon RDS database, Amazon Q can discover this relationship using data sources such as X-Ray and CloudWatch Application Signals. However, if you haven't deployed these features, Amazon Q will attempt to identify possible relationships. Tag boundaries can be used to narrow the resources that will be discovered by Amazon Q in these cases. You don't need to enter tags created by myApplications or CloudFormation, because Amazon Q can automatically detect those tags.
    ///   - tags: A list of key-value pairs to associate with the investigation group. You can associate as many as 50 tags with an investigation group. To be able to associate tags when you create the investigation group, you must have the cloudwatch:TagResource permission. Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
    ///   - logger: Logger use during operation
    @inlinable
    public func createInvestigationGroup(
        chatbotNotificationChannel: [String: [String]]? = nil,
        crossAccountConfigurations: [CrossAccountConfiguration]? = nil,
        encryptionConfiguration: EncryptionConfiguration? = nil,
        isCloudTrailEventHistoryEnabled: Bool? = nil,
        name: String,
        retentionInDays: Int64? = nil,
        roleArn: String,
        tagKeyBoundaries: [String]? = nil,
        tags: [String: String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateInvestigationGroupOutput {
        let input = CreateInvestigationGroupInput(
            chatbotNotificationChannel: chatbotNotificationChannel, 
            crossAccountConfigurations: crossAccountConfigurations, 
            encryptionConfiguration: encryptionConfiguration, 
            isCloudTrailEventHistoryEnabled: isCloudTrailEventHistoryEnabled, 
            name: name, 
            retentionInDays: retentionInDays, 
            roleArn: roleArn, 
            tagKeyBoundaries: tagKeyBoundaries, 
            tags: tags
        )
        return try await self.createInvestigationGroup(input, logger: logger)
    }

    /// Deletes the specified investigation group from your account. You can currently have one investigation group per Region in your account. After you delete an investigation group, you can later create a new investigation group in the same Region.
    @Sendable
    @inlinable
    public func deleteInvestigationGroup(_ input: DeleteInvestigationGroupRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DeleteInvestigationGroup", 
            path: "/investigationGroups/{identifier}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes the specified investigation group from your account. You can currently have one investigation group per Region in your account. After you delete an investigation group, you can later create a new investigation group in the same Region.
    ///
    /// Parameters:
    ///   - identifier: Specify either the name or the ARN of the investigation group that you want to delete.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteInvestigationGroup(
        identifier: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DeleteInvestigationGroupRequest(
            identifier: identifier
        )
        return try await self.deleteInvestigationGroup(input, logger: logger)
    }

    /// Removes the IAM resource policy from being associated with the investigation group that you specify.
    @Sendable
    @inlinable
    public func deleteInvestigationGroupPolicy(_ input: DeleteInvestigationGroupPolicyRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteInvestigationGroupPolicyOutput {
        try await self.client.execute(
            operation: "DeleteInvestigationGroupPolicy", 
            path: "/investigationGroups/{identifier}/policy", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes the IAM resource policy from being associated with the investigation group that you specify.
    ///
    /// Parameters:
    ///   - identifier: Specify either the name or the ARN of the investigation group that you want to remove the policy from.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteInvestigationGroupPolicy(
        identifier: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteInvestigationGroupPolicyOutput {
        let input = DeleteInvestigationGroupPolicyRequest(
            identifier: identifier
        )
        return try await self.deleteInvestigationGroupPolicy(input, logger: logger)
    }

    /// Returns the configuration information for the specified investigation group.
    @Sendable
    @inlinable
    public func getInvestigationGroup(_ input: GetInvestigationGroupRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetInvestigationGroupResponse {
        try await self.client.execute(
            operation: "GetInvestigationGroup", 
            path: "/investigationGroups/{identifier}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the configuration information for the specified investigation group.
    ///
    /// Parameters:
    ///   - identifier: Specify either the name or the ARN of the investigation group that you want to view.
    ///   - logger: Logger use during operation
    @inlinable
    public func getInvestigationGroup(
        identifier: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetInvestigationGroupResponse {
        let input = GetInvestigationGroupRequest(
            identifier: identifier
        )
        return try await self.getInvestigationGroup(input, logger: logger)
    }

    /// Returns the IAM resource policy that is associated with the specified investigation group.
    @Sendable
    @inlinable
    public func getInvestigationGroupPolicy(_ input: GetInvestigationGroupPolicyRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetInvestigationGroupPolicyResponse {
        try await self.client.execute(
            operation: "GetInvestigationGroupPolicy", 
            path: "/investigationGroups/{identifier}/policy", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the IAM resource policy that is associated with the specified investigation group.
    ///
    /// Parameters:
    ///   - identifier: Specify either the name or the ARN of the investigation group that you want to view the policy of.
    ///   - logger: Logger use during operation
    @inlinable
    public func getInvestigationGroupPolicy(
        identifier: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetInvestigationGroupPolicyResponse {
        let input = GetInvestigationGroupPolicyRequest(
            identifier: identifier
        )
        return try await self.getInvestigationGroupPolicy(input, logger: logger)
    }

    /// Returns the ARN and name of each investigation group in the account.
    @Sendable
    @inlinable
    public func listInvestigationGroups(_ input: ListInvestigationGroupsInput, logger: Logger = AWSClient.loggingDisabled) async throws -> ListInvestigationGroupsOutput {
        try await self.client.execute(
            operation: "ListInvestigationGroups", 
            path: "/investigationGroups", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the ARN and name of each investigation group in the account.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of results to return in one operation. If you omit this parameter, the default of 50 is used.
    ///   - nextToken: Include this value, if it was returned by the previous operation, to get the next set of service operations.
    ///   - logger: Logger use during operation
    @inlinable
    public func listInvestigationGroups(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListInvestigationGroupsOutput {
        let input = ListInvestigationGroupsInput(
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listInvestigationGroups(input, logger: logger)
    }

    /// Displays the tags associated with a CloudWatch investigations resource. Currently, investigation groups support tagging.
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceOutput {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/tags/{resourceArn}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Displays the tags associated with a CloudWatch investigations resource. Currently, investigation groups support tagging.
    ///
    /// Parameters:
    ///   - resourceArn: The ARN of the CloudWatch investigations resource that you want to view tags for. You can use the ListInvestigationGroups operation to find the ARNs of investigation groups. The ARN format for an investigation group is arn:aws:aiops:Region:account-id:investigation-group:investigation-group-id .
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        resourceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceOutput {
        let input = ListTagsForResourceRequest(
            resourceArn: resourceArn
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    /// Creates an IAM resource policy and assigns it to the specified investigation group. If you create your investigation group with CreateInvestigationGroup and you want to enable CloudWatch alarms to create investigations and add events to investigations, you must use this operation to create a policy similar to this example.  { "Version": "2008-10-17", "Statement": [{ "Effect": "Allow", "Principal": { "Service": "aiops.alarms.cloudwatch.amazonaws.com" }, "Action": ["aiops:CreateInvestigation", "aiops:CreateInvestigationEvent"], "Resource": "*", "Condition": { "StringEquals": { "aws:SourceAccount": "account-id" }, "ArnLike": { "aws:SourceArn": "arn:aws:cloudwatch:region:account-id:alarm:*" } } }] }
    @Sendable
    @inlinable
    public func putInvestigationGroupPolicy(_ input: PutInvestigationGroupPolicyRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> PutInvestigationGroupPolicyResponse {
        try await self.client.execute(
            operation: "PutInvestigationGroupPolicy", 
            path: "/investigationGroups/{identifier}/policy", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates an IAM resource policy and assigns it to the specified investigation group. If you create your investigation group with CreateInvestigationGroup and you want to enable CloudWatch alarms to create investigations and add events to investigations, you must use this operation to create a policy similar to this example.  { "Version": "2008-10-17", "Statement": [{ "Effect": "Allow", "Principal": { "Service": "aiops.alarms.cloudwatch.amazonaws.com" }, "Action": ["aiops:CreateInvestigation", "aiops:CreateInvestigationEvent"], "Resource": "*", "Condition": { "StringEquals": { "aws:SourceAccount": "account-id" }, "ArnLike": { "aws:SourceArn": "arn:aws:cloudwatch:region:account-id:alarm:*" } } }] }
    ///
    /// Parameters:
    ///   - identifier: Specify either the name or the ARN of the investigation group that you want to assign the policy to.
    ///   - policy: The policy, in JSON format.
    ///   - logger: Logger use during operation
    @inlinable
    public func putInvestigationGroupPolicy(
        identifier: String,
        policy: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> PutInvestigationGroupPolicyResponse {
        let input = PutInvestigationGroupPolicyRequest(
            identifier: identifier, 
            policy: policy
        )
        return try await self.putInvestigationGroupPolicy(input, logger: logger)
    }

    /// Assigns one or more tags (key-value pairs) to the specified resource. Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values. Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters. You can associate as many as 50 tags with a resource.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TagResourceResponse {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/tags/{resourceArn}", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Assigns one or more tags (key-value pairs) to the specified resource. Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values. Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters. You can associate as many as 50 tags with a resource.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) of the resource that you want to apply the tags to. You can use the ListInvestigationGroups operation to find the ARNs of investigation groups.
    ///   - tags: The list of key-value pairs to associate with the resource.
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        resourceArn: String,
        tags: [String: String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TagResourceResponse {
        let input = TagResourceRequest(
            resourceArn: resourceArn, 
            tags: tags
        )
        return try await self.tagResource(input, logger: logger)
    }

    /// Removes one or more tags from the specified resource.
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UntagResourceResponse {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/tags/{resourceArn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes one or more tags from the specified resource.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) of the resource that you want to remove the tags from. You can use the ListInvestigationGroups operation to find the ARNs of investigation groups.
    ///   - tagKeys: The list of tag keys to remove from the resource.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        resourceArn: String,
        tagKeys: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UntagResourceResponse {
        let input = UntagResourceRequest(
            resourceArn: resourceArn, 
            tagKeys: tagKeys
        )
        return try await self.untagResource(input, logger: logger)
    }

    /// Updates the configuration of the specified investigation group.
    @Sendable
    @inlinable
    public func updateInvestigationGroup(_ input: UpdateInvestigationGroupRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateInvestigationGroupOutput {
        try await self.client.execute(
            operation: "UpdateInvestigationGroup", 
            path: "/investigationGroups/{identifier}", 
            httpMethod: .PATCH, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates the configuration of the specified investigation group.
    ///
    /// Parameters:
    ///   - chatbotNotificationChannel: Use this structure to integrate CloudWatch investigations with Amazon Q in chat applications. This structure is a string array. For the first string, specify the ARN of an Amazon SNS topic. For the array of strings, specify the ARNs of one or more Amazon Q in chat applications configurations that you want to associate with that topic. For more information about these configuration ARNs, see Getting started with Amazon Q in chat applications and Resource type defined by Amazon Web Services Chatbot.
    ///   - crossAccountConfigurations: Used to configure cross-account access for an investigation group. It allows the investigation group to access resources in other accounts.
    ///   - encryptionConfiguration: Use this structure if you want to use a customer managed KMS key to encrypt your investigation data. If you omit this parameter, CloudWatch investigations will use an Amazon Web Services key to encrypt the data. For more information, see Encryption of investigation data.
    ///   - identifier: Specify either the name or the ARN of the investigation group that you want to modify.
    ///   - isCloudTrailEventHistoryEnabled: Specify true to enable CloudWatch investigations to have access to change events that are recorded by CloudTrail. The default is true.
    ///   - roleArn: Specify this field if you want to change the IAM role that CloudWatch investigations will use when it gathers investigation data. To do so, specify the ARN of the new role. The permissions in this role determine which of your resources that CloudWatch investigations will have access to during investigations. For more information, see EHow to control what data Amazon Q has access to during investigations.
    ///   - tagKeyBoundaries: Enter the existing custom tag keys for custom applications in your system. Resource tags help Amazon Q narrow the search space when it is unable to discover definite relationships between resources. For example, to discover that an Amazon ECS service depends on an Amazon RDS database, Amazon Q can discover this relationship using data sources such as X-Ray and CloudWatch Application Signals. However, if you haven't deployed these features, Amazon Q will attempt to identify possible relationships. Tag boundaries can be used to narrow the resources that will be discovered by Amazon Q in these cases. You don't need to enter tags created by myApplications or CloudFormation, because Amazon Q can automatically detect those tags.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateInvestigationGroup(
        chatbotNotificationChannel: [String: [String]]? = nil,
        crossAccountConfigurations: [CrossAccountConfiguration]? = nil,
        encryptionConfiguration: EncryptionConfiguration? = nil,
        identifier: String,
        isCloudTrailEventHistoryEnabled: Bool? = nil,
        roleArn: String? = nil,
        tagKeyBoundaries: [String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateInvestigationGroupOutput {
        let input = UpdateInvestigationGroupRequest(
            chatbotNotificationChannel: chatbotNotificationChannel, 
            crossAccountConfigurations: crossAccountConfigurations, 
            encryptionConfiguration: encryptionConfiguration, 
            identifier: identifier, 
            isCloudTrailEventHistoryEnabled: isCloudTrailEventHistoryEnabled, 
            roleArn: roleArn, 
            tagKeyBoundaries: tagKeyBoundaries
        )
        return try await self.updateInvestigationGroup(input, logger: logger)
    }
}

extension AIOps {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: AIOps, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension AIOps {
    /// Return PaginatorSequence for operation ``listInvestigationGroups(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listInvestigationGroupsPaginator(
        _ input: ListInvestigationGroupsInput,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListInvestigationGroupsInput, ListInvestigationGroupsOutput> {
        return .init(
            input: input,
            command: self.listInvestigationGroups,
            inputKey: \ListInvestigationGroupsInput.nextToken,
            outputKey: \ListInvestigationGroupsOutput.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listInvestigationGroups(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of results to return in one operation. If you omit this parameter, the default of 50 is used.
    ///   - logger: Logger used for logging
    @inlinable
    public func listInvestigationGroupsPaginator(
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListInvestigationGroupsInput, ListInvestigationGroupsOutput> {
        let input = ListInvestigationGroupsInput(
            maxResults: maxResults
        )
        return self.listInvestigationGroupsPaginator(input, logger: logger)
    }
}

extension AIOps.ListInvestigationGroupsInput: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> AIOps.ListInvestigationGroupsInput {
        return .init(
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}
